<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>JS中的字符串和Object之间互转的API</title>
    <meta content="" charset="UTF-8">
    <script language="JavaScript" src="script/vue.js"></script>
    <script language="JavaScript" src="script/axios.min.js"></script>
    <script type="" language="JavaScript">
        function hello01() {
            var str = "{\"uname\":\"lina\",\"age\":20}";
            var user = JSON.parse(str);
            alert(typeof user);
            alert(user.uname + "_" + user.age);
        }

        function hello02() {
            var user = {"uname": "lina", "age": 3};
            alert(typeof user);
            var userStr = JSON.stringify(user);
            alert(userStr);
        }
    </script>
</head>
<body>
<div id="div0">
    <input type="button" value="提交" onclick="hello02()"></input>
</div>
</body>
</html>